/****************************************************************************\
 * @file    game_pic.h
 * @author  马新硕
 * @date    2022/09/20
 * @brief   游戏的图片素材
 * @note    
 ******************************************************************************
 * @attent  
 ****************************************************************************/
#ifndef _H_GAME_PIC
#define _H_GAME_PIC
#include "stdint.h"

/*                角色                */
typedef struct{
  unsigned char * pPic;   //图片指针
  uint16_t        Pixel_x;  //x方向长度
  uint16_t        Pixel_y;  //y方向长度
  int16_t         Vertec_x; //左顶点所在x坐标
  int16_t         Vertec_y; //左顶点所在y坐标
  int16_t         Center_x;
  int16_t         Center_y;
  int16_t         lastCenter_x;
  int16_t         lastCenter_y;
  uint8_t         Crash_r; //碰撞半径
  float           Vel_x;
  float           Vel_y;
  float           lastVel_x;
  float           lastVel_y;
  int8_t          Health;
  uint8_t         MaxHealth;
  int8_t          Shield;
  uint8_t         MaxShield;
  uint8_t         Energy;
  uint8_t         MaxEnergy;
  uint8_t         Power;
  uint8_t         MaxPower;
}UsersRole_t;

//角色图片
typedef struct{
  uint8_t*    pStand1;
  uint8_t*    pStand1_r;
  uint8_t*    pRun1;
  uint8_t*    pRun1_r;
  uint8_t*    pRun2;
  uint8_t*    pRun2_r;
  uint8_t*    pRun3;
  uint8_t*    pRun3_r;
  uint8_t*    pRun4;
  uint8_t*    pRun4_r;
  uint8_t*    pDead;
  uint8_t*    pDead_r;
}UsersRunPic_t;

/*                敌人                */
typedef struct{
  unsigned char * pPic;     //图片指针
  uint16_t        Pixel_x;  //x方向长度
  uint16_t        Pixel_y;  //y方向长度
  int16_t         Vertec_x; //左顶点所在x坐标
  int16_t         Vertec_y; //左顶点所在y坐标
  int16_t         Center_x;
  int16_t         Center_y;
  int16_t         lastCenter_x;
  int16_t         lastCenter_y;
  uint8_t         Crash_r; //碰撞半径
  float           Vel_x;
  float           Vel_y;
  int8_t          Health;
  uint8_t         Damage;
}Enemy_t;



/*                武器                */
typedef struct{
  uint8_t*        pPic;
  uint8_t         wPixel_x;
  uint8_t         wPixel_y;
  int16_t         wVertec_x;
  int16_t         wVertec_y;
  int16_t         wGunpoint_x;//枪口坐标
  int16_t         wGunpoint_y;
  uint8_t         wCrash_r;
  uint8_t         wDamage;
  uint8_t         wEnergy;
  uint16_t        wGenTime;
}Weapon_t;

//武器图片
typedef struct{
  uint8_t*    pLittleGun;
  uint8_t*    pLittleGun_r;
  uint8_t*    pKnife;
  uint8_t*    pKnife_r;
  uint8_t*    pKnife2;
  uint8_t*    pKnife2_r;
}Weapon_Pic_t;

/*                子弹                */
typedef struct{
  uint8_t*        pPic;
  uint8_t         bPixel_x;
  uint8_t         bPixel_y;
  int16_t         bVertec_x;
  int16_t         bVertec_y;
  int16_t         bCenter_x;
  int16_t         bCenter_y;
  uint8_t         bCrash_r; //碰撞半径
  float           bVel_x;
  float           bVel_y;
  uint8_t         bDamage;
  uint8_t         isExist;
}Bullet_t;//子弹

//TODO 

/*                地图元素                */
//墙壁
typedef struct{
  uint8_t*        pPic;
  uint8_t         Pixel_x;
  uint8_t         Pixel_y;
  int16_t         Vertec_x;
  int16_t         Vertec_y;
  uint8_t         SquarePixel_x;//指墙面的方形平面
  uint8_t         SquarePixel_y;
}Wall_t;

//玩家状态栏
typedef struct{
  uint8_t*        pPic;
  uint8_t         Pixel_x;
  uint8_t         Pixel_y;
  int16_t         Vertec_x;
  int16_t         Vertec_y;
  int16_t         DrawVertec_x;//填充空白部分的顶点
  int16_t         ConstDrawVertec_x;//不动的填充空白部分的顶点
  int16_t         DrawVertec_y;
  uint8_t         DrawPiexl_x;//空白部分像素大小
  uint8_t         DrawPiexl_y;
  uint8_t         WhitePiexl_x;
  uint8_t         WhitePiexl_y;
}StatusBar_t;

//地板
typedef struct{
  uint8_t*        pPic;
  uint8_t         Pixel_x;
  uint8_t         Pixel_y;
  int16_t         Vertec_x;
  int16_t         Vertec_y;
}Floor_t;

typedef struct{
  uint8_t*        pFloor1;
  uint8_t*        pFloor2;  
}Floor_Pic_t;

//不可破坏地图障碍
typedef struct{
  uint8_t*        pPic;
  uint8_t         Pixel_x;
  uint8_t         Pixel_y;
  int16_t         Vertec_x;
  int16_t         Vertec_y;
  int16_t         Center_x;
  int16_t         Center_y;
  int16_t         LeftBoundary;
  int16_t         RightBoundary;
  int16_t         UpBoundary;
  int16_t         DownBoundary;
  uint8_t         isCreated;
}Barrier_t;

//可破坏地图障碍
typedef struct{
  uint8_t*        pPic;
  uint8_t         Pixel_x;
  uint8_t         Pixel_y;
  int16_t         Vertec_x;
  int16_t         Vertec_y;
  int16_t         Center_x;
  int16_t         Center_y;
  int16_t         LeftBoundary;
  int16_t         RightBoundary;
  int16_t         UpBoundary;
  int16_t         DownBoundary;
  uint8_t         Health;
  uint8_t         isCreated;//是否被创建
  uint8_t         isExist;  //是否存在
}DestructibleBarrier_t;

//传送门图片
typedef struct{
  uint8_t*    Tans0;
  uint8_t*    Tans1;
  uint8_t*    Tans2;
  uint8_t*    Tans3;
}Tansfer_Gate_t;

//开始与结束界面图片
typedef struct{
  uint8_t*    startPic;
  uint8_t*    failText;
  uint8_t*    failPic;
  uint8_t*    victoryText;
  uint8_t*    victoryPic;
}Surface_Pic_t;

extern UsersRole_t Knight;
extern UsersRunPic_t knightRunPic;

extern Enemy_t Enemy1;
extern Enemy_t Enemy2;
extern Enemy_t Enemy3;
extern Enemy_t Enemy4;

extern Enemy_t Servant1;
extern Enemy_t Servant2;
extern Enemy_t Servant3;
extern Enemy_t Servant4;

extern Enemy_t Boss1;
extern Enemy_t Boss_shield;
extern Enemy_t Boss_mini;

extern Weapon_t LittleGun;
extern Weapon_Pic_t Weapon_Pic;

extern Weapon_t Knife;
extern Weapon_t Knife_2;


extern Bullet_t UsersBullet_1;
extern Bullet_t EnemiesBullet_1;
extern Bullet_t Knife_1;
extern Bullet_t BossBullet_1;
extern Bullet_t TrackBullet;
extern Bullet_t BossFire_1;
extern Bullet_t BossFire_2;
extern Bullet_t BossFire_3;

extern Wall_t Wall;
extern Floor_t Floor1;
extern Floor_Pic_t FloorPic;
extern Barrier_t Barrier;
extern Barrier_t Barrier01;
extern DestructibleBarrier_t DesBarrier;
extern Tansfer_Gate_t Tansfer_Gate;

extern StatusBar_t StatusBar1;
extern StatusBar_t StatusBar2;
extern StatusBar_t StatusBar3;
extern StatusBar_t StatusBar4;

extern Surface_Pic_t Surface_Pic;
#endif
